﻿<div class="row">
    <div class="col-md-6">
        <div class="box box-solid">
            <div class="box-header with-border">
                <i class="fa fa-fw fa-list"></i>
                <h3 class="box-title">概况</h3>
            </div><!-- /.box-header -->
            <div class="box-body">

                <dl class="dl-horizontal sysSurvey">
                    <dt class="text-info"><i class="fa fa-fw fa-user"></i> 管理员数</dt>
                    <dd>{{adminCount}}</dd>
                    <dt class="text-info"><i class="fa fa-fw fa-users"></i> 注册用户</dt>
                    <dd>{{regUsersCount}}</dd>
                    <dt class="text-info"><i class="fa fa-fw fa-file-text-o"></i> 文档总数</dt>
                    <dd>{{contentsCount}}</dd>
                </dl>
            </div><!-- /.box-body -->
        </div><!-- /.box -->
    </div><!-- ./col -->
    <div class="col-md-6">
        <div class="box box-solid">
            <div class="box-header with-border">
                <i class="fa fa-location-arrow"></i>
                <h3 class="box-title">快捷操作</h3>
            </div><!-- /.box-header -->
            <div class="box-body">
                <ul class="list-unstyled">
                    <li><a href="/admin/manage/adminUsersList"><i class="fa fa-fw fa-user"></i> 添加管理员</a></li>
                    <li><a href="/admin/manage/content/add"><i class="fa fa-fw fa-file-text-o"></i> 创建新文档</a></li>
                </ul>

            </div><!-- /.box-body -->
        </div><!-- /.box -->
    </div><!-- ./col -->
</div>

<script>
angular.module("adminApp",[])
.controller("adminCtrl",function($scope,$http){
            $http.get("/admin/manage/getAdminCount").success(function(result){
                $scope.adminCount = result.count;
            });
            $http.get("/admin/manage/getRegUsersCount").success(function(result){
                $scope.regUsersCount = result.count;
            });
            $http.get("/admin/manage/getContentsCount").success(function(result){
                $scope.contentsCount = result.count;
            });
})
</script>